/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author PR
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface WmsDownLog extends BasicModel<WmsDownLog> {
  cbustype?: string; // 业务类型
  cbuskey?: string; // 业务key
  cinvcode?: string; // 物料编码
  cinvname?: string; // 物料名称
  cbatch?: string; // 批次
  iqty?: number; // 数量down
  cposcode?: string; // 货位
  cwhcode?: string; // 仓库
}

export const wmsDownLogList = (params?: WmsDownLog | any) =>
  defHttp.get<WmsDownLog>({ url: adminPath + '/log/down/wmsDownLog/list', params });

export const wmsDownLogListData = (params?: WmsDownLog | any) =>
  defHttp.post<Page<WmsDownLog>>({ url: adminPath + '/log/down/wmsDownLog/listData', params });

export const wmsDownLogForm = (params?: WmsDownLog | any) =>
  defHttp.get<WmsDownLog>({ url: adminPath + '/log/down/wmsDownLog/form', params });

export const wmsDownLogSave = (params?: any, data?: WmsDownLog | any) =>
  defHttp.postJson<WmsDownLog>({ url: adminPath + '/log/down/wmsDownLog/save', params, data });

export const wmsDownLogDelete = (params?: WmsDownLog | any) =>
  defHttp.get<WmsDownLog>({ url: adminPath + '/log/down/wmsDownLog/delete', params });
